package com.datviet.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@NamedQueries(
		value = {@NamedQuery(name = "findRoleByMatchedName", query = "select r from Role r where r.role = :role")}
		)
@Entity
@Table(name = "ts_role")
public class Role implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@TableGenerator(name = "sequence_table", table = "ts_sequence", pkColumnName = "id_name", valueColumnName = "id_val", pkColumnValue = "ROLE", allocationSize=1)
	@GeneratedValue(generator = "sequence_table", strategy = GenerationType.TABLE)	
	private Long id;
	private String role;
	
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public String getRole() {
		return role;
	}
	
	public void setRole(String role) {
		this.role = role;
	}
}
